package cn.z2huo.knowledge.concurrency.queue;

import lombok.Getter;
import lombok.extern.slf4j.Slf4j;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * <p>
 *
 * @author z2huo
 */
@Slf4j
class BlockingQueueTest {

    private static final int QUEUE_CAPACITY = 5;

    @Getter
    private final BlockingQueue<String> queue = new ArrayBlockingQueue<>(QUEUE_CAPACITY);

    public void test() {

    }

    public static void main(String[] args) {
        BlockingQueueTest test = new BlockingQueueTest();

        try (ExecutorService threadPool = Executors.newFixedThreadPool(10)) {

            threadPool.execute(() -> {

            });
        }

    }

}
